package com.itcncp.wechat.app.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UserRechangeOpJnl implements Serializable {
    /**
     * 充值流水号
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long rechargeNo;

    /**
     * 客户id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    /**
     * 充值方式 1、微信 2、支付宝 3、银联 4、银行卡 3、其他
     *
     * @mbg.generated
     */
    private Byte rechargeWay;

    /**
     * 充值金额
     *
     * @mbg.generated
     */
    private BigDecimal rechargeAmount;

    /**
     * 实收金额
     *
     * @mbg.generated
     */
    private BigDecimal rechargeActAmount;

    /**
     * 充值费率
     *
     * @mbg.generated
     */
    private BigDecimal rechargeFee;

    /**
     * 充值时间
     *
     * @mbg.generated
     */
    private Date rechargeTime;

    /**
     * 充值状态： 1、失败； 2、成功
     *
     * @mbg.generated
     */
    private Byte rechargeState;

    /**
     * 第三方交易号
     *
     * @mbg.generated
     */
    private String dOrderNo;

    /**
     * 充值前账户余额
     *
     * @mbg.generated
     */
    private BigDecimal oldBalance;

    /**
     * 充值后账户余额
     *
     * @mbg.generated
     */
    private BigDecimal nowBalance;

    private String remark;

    private Object wxPayMpOrderResult;

    private static final long serialVersionUID = 1L;

    public Long getRechargeNo() {
        return rechargeNo;
    }

    public void setRechargeNo(Long rechargeNo) {
        this.rechargeNo = rechargeNo;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Byte getRechargeWay() {
        return rechargeWay;
    }

    public void setRechargeWay(Byte rechargeWay) {
        this.rechargeWay = rechargeWay;
    }

    public BigDecimal getRechargeAmount() {
        return rechargeAmount;
    }

    public void setRechargeAmount(BigDecimal rechargeAmount) {
        this.rechargeAmount = rechargeAmount;
    }

    public BigDecimal getRechargeActAmount() {
        return rechargeActAmount;
    }

    public void setRechargeActAmount(BigDecimal rechargeActAmount) {
        this.rechargeActAmount = rechargeActAmount;
    }

    public BigDecimal getRechargeFee() {
        return rechargeFee;
    }

    public void setRechargeFee(BigDecimal rechargeFee) {
        this.rechargeFee = rechargeFee;
    }

    public Date getRechargeTime() {
        return rechargeTime;
    }

    public void setRechargeTime(Date rechargeTime) {
        this.rechargeTime = rechargeTime;
    }

    public Byte getRechargeState() {
        return rechargeState;
    }

    public void setRechargeState(Byte rechargeState) {
        this.rechargeState = rechargeState;
    }

    public String getdOrderNo() {
        return dOrderNo;
    }

    public void setdOrderNo(String dOrderNo) {
        this.dOrderNo = dOrderNo;
    }

    public BigDecimal getOldBalance() {
        return oldBalance;
    }

    public void setOldBalance(BigDecimal oldBalance) {
        this.oldBalance = oldBalance;
    }

    public BigDecimal getNowBalance() {
        return nowBalance;
    }

    public void setNowBalance(BigDecimal nowBalance) {
        this.nowBalance = nowBalance;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Object getWxPayMpOrderResult() {
        return wxPayMpOrderResult;
    }

    public void setWxPayMpOrderResult(Object wxPayMpOrderResult) {
        this.wxPayMpOrderResult = wxPayMpOrderResult;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rechargeNo=").append(rechargeNo);
        sb.append(", userId=").append(userId);
        sb.append(", rechargeWay=").append(rechargeWay);
        sb.append(", rechargeAmount=").append(rechargeAmount);
        sb.append(", rechargeActAmount=").append(rechargeActAmount);
        sb.append(", rechargeFee=").append(rechargeFee);
        sb.append(", rechargeTime=").append(rechargeTime);
        sb.append(", rechargeState=").append(rechargeState);
        sb.append(", dOrderNo=").append(dOrderNo);
        sb.append(", oldBalance=").append(oldBalance);
        sb.append(", nowBalance=").append(nowBalance);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserRechangeOpJnl other = (UserRechangeOpJnl) that;
        return (this.getRechargeNo() == null ? other.getRechargeNo() == null : this.getRechargeNo().equals(other.getRechargeNo()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getRechargeWay() == null ? other.getRechargeWay() == null : this.getRechargeWay().equals(other.getRechargeWay()))
            && (this.getRechargeAmount() == null ? other.getRechargeAmount() == null : this.getRechargeAmount().equals(other.getRechargeAmount()))
            && (this.getRechargeActAmount() == null ? other.getRechargeActAmount() == null : this.getRechargeActAmount().equals(other.getRechargeActAmount()))
            && (this.getRechargeFee() == null ? other.getRechargeFee() == null : this.getRechargeFee().equals(other.getRechargeFee()))
            && (this.getRechargeTime() == null ? other.getRechargeTime() == null : this.getRechargeTime().equals(other.getRechargeTime()))
            && (this.getRechargeState() == null ? other.getRechargeState() == null : this.getRechargeState().equals(other.getRechargeState()))
            && (this.getdOrderNo() == null ? other.getdOrderNo() == null : this.getdOrderNo().equals(other.getdOrderNo()))
            && (this.getOldBalance() == null ? other.getOldBalance() == null : this.getOldBalance().equals(other.getOldBalance()))
            && (this.getNowBalance() == null ? other.getNowBalance() == null : this.getNowBalance().equals(other.getNowBalance()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRechargeNo() == null) ? 0 : getRechargeNo().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getRechargeWay() == null) ? 0 : getRechargeWay().hashCode());
        result = prime * result + ((getRechargeAmount() == null) ? 0 : getRechargeAmount().hashCode());
        result = prime * result + ((getRechargeActAmount() == null) ? 0 : getRechargeActAmount().hashCode());
        result = prime * result + ((getRechargeFee() == null) ? 0 : getRechargeFee().hashCode());
        result = prime * result + ((getRechargeTime() == null) ? 0 : getRechargeTime().hashCode());
        result = prime * result + ((getRechargeState() == null) ? 0 : getRechargeState().hashCode());
        result = prime * result + ((getdOrderNo() == null) ? 0 : getdOrderNo().hashCode());
        result = prime * result + ((getOldBalance() == null) ? 0 : getOldBalance().hashCode());
        result = prime * result + ((getNowBalance() == null) ? 0 : getNowBalance().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}